package com.xwyzsn.food.controller;


import com.xwyzsn.food.service.RestaurantService;
import com.xwyzsn.food.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author scorpios
 * @since 2024-03-13
 */
@RestController
@RequestMapping("/food/restaurant")
@CrossOrigin(value = "*")
public class RestaurantController {

    @Autowired
    private RestaurantService service;
    @PostMapping("/get_one")
    public Result getOne(@RequestBody Map<String,?> payload){
        return Result.succ(service.get(payload));
    }


//    @PostMapping("/add_one")
//    public Result addOne(@RequestBody Map<String,?> payload){
//
//        return Result.succ(service.add(payload));
//    }
//
//    @PostMapping("/delete_one")
//    public Result deleteOne(@RequestBody Map<String,?>payload){
//        return Result.succ(service.delete(payload));
//    }
}

